# -*- coding: utf-8 -*-
# @Time: 2024/12/19 14:09
# @Author: foxhuty
# @File: abc_notes.py.py
import time
import pandas as pd


def time_used(func):
    def wrapper(*args, **kwargs):
        start = time.time()
        result = func(*args, **kwargs)
        end = time.time()
        print(end - start)
        return result

    return wrapper


@time_used
def abc_1():
    for a in range(0, 1001):
        for b in range(0, 1001):
            for c in range(0, 1001):
                if a + b + c == 1000 and a ** 2 + b ** 2 == c ** 2:
                    print(f'{a},{b},{c}')


@time_used
def abc_2():
    for a in range(0, 1001):
        for b in range(0, 1001):
            c = 1000 - a - b
            if a ** 2 + b ** 2 == c ** 2:
                print(f'{a},{b},{c}')



if __name__ == '__main__':
    dic=[{'name': '肖申克的救赎', 'director': ' 弗兰克·德拉邦特 Frank Darabont', 'actor': ' 蒂姆·罗宾斯 Tim Robbins /...', 'year': '1994', 'score': '9.7', 'number': '3192161'},
         {'name': '霸王别姬', 'director': ' 陈凯歌 Kaige Chen', 'actor': ' 张国荣 Leslie Cheung / 张丰毅 Fengyi Zha...', 'year': '1993', 'score': '9.6', 'number': '2356497'}]
    df = pd.DataFrame(dic)
    print(df)
    lst=['a','b','c','d','a','f','b','h','i','c']
    lst_set=set(lst)
    print(lst_set.remove('c'))
    print(lst_set)
